home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist / dist6.3 / gl_dev.idb / usr / include / gl / glconsts.h.z / glconsts.h
C/C++ Source or Header  |  1996-12-06  |  24KB  |  934 lines

  1. #ifndef __GL_GLCONSTS_H__
  2. #define __GL_GLCONSTS_H__
  3. /**************************************************************************
  4.  *                                      *
  5.  *          Copyright (C) 1984, Silicon Graphics, Inc.          *
  6.  *                                      *
  7.  *  These coded instructions, statements, and computer programs  contain  *
  8.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  9.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  10.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  11.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  12.  *                                      *
  13.  **************************************************************************/
  14.  
  15. #if 0
  16. Lines encapulated by #if 0/#endif will not appear in the public gl.h
  17. #endif
  18.  
  19. /* Graphics Libary constants */
  20.  
  21. #ifndef    NULL
  22. #define NULL            0
  23. #endif
  24.  
  25. #ifndef    FALSE
  26. #define FALSE            0
  27. #endif
  28.  
  29. #ifndef    TRUE
  30. #define TRUE            1
  31. #endif
  32.  
  33.  
  34. /* various hardware/software limits */
  35. #define ATTRIBSTACKDEPTH    10
  36. #define VPSTACKDEPTH        8
  37. #define MATRIXSTACKDEPTH    32
  38. #define NAMESTACKDEPTH        1025
  39.  
  40. /* special pre-defined tags */
  41. #define STARTTAG        -2
  42. #define ENDTAG            -3
  43.  
  44. /* names for colors in color map loaded by greset */
  45. #define BLACK            0
  46. #define RED            1
  47. #define GREEN            2
  48. #define YELLOW            3
  49. #define BLUE            4
  50. #define MAGENTA            5
  51. #define CYAN            6
  52. #define WHITE            7
  53.  
  54. /* popup colors */
  55. #define PUP_CLEAR        0
  56. #define PUP_COLOR        1
  57. #define PUP_BLACK        2
  58. #define PUP_WHITE        3
  59.  
  60. /* defines for drawmode and mswapbuffers*/
  61. #define NORMALDRAW        0x010
  62. #define PUPDRAW            0x020
  63. #define OVERDRAW        0x040
  64. #define UNDERDRAW        0x080
  65. #define CURSORDRAW        0x100
  66. #define DUALDRAW        0x200    /* obselete skywriter only */
  67. #define GANGDRAW        0x200    /* not available on skywriter */
  68. #define HYPER0            0x10000
  69. #define HYPER1            0x20000
  70. #define HYPER2            0x40000
  71.  
  72. /* defines for defpattern */
  73. #define PATTERN_16        16
  74. #define PATTERN_32        32
  75. #define PATTERN_64        64
  76.  
  77. #define PATTERN_16_SIZE        16
  78. #define PATTERN_32_SIZE        64
  79. #define PATTERN_64_SIZE        256
  80.  
  81. /* defines for readsource */
  82. #define SRC_NULL        -1
  83. #define SRC_AUTO        0
  84. #define SRC_FRONT        1
  85. #define SRC_FRONTLEFT         1
  86. #define SRC_BACK        2
  87. #define SRC_BACKLEFT         2
  88. #define SRC_ZBUFFER        3
  89. #define SRC_PUP            4
  90. #define SRC_OVER        5
  91. #define SRC_UNDER        6
  92. #define SRC_FRAMEGRABBER     7
  93. #define SRC_FRONTRIGHT         8
  94. #define SRC_BACKRIGHT         9
  95. #define SRC_ILBUFFER_1        1000
  96. #define SRC_ILBUFFER_2        1001
  97. #define SRC_ILBUFFER_3        1002
  98. #define SRC_ILBUFFER_4        1003
  99. #define SRC_ILBUFFER_5        1004
  100. #define SRC_ILBUFFER_6        1005
  101. #define SRC_ILBUFFER_7        1006
  102. #define SRC_ILBUFFER_8        1007
  103. #define SRC_ILBUFFER_9        1008
  104. #define SRC_ILBUFFER_10        1009
  105. #define SRC_ILBUFFER_11        1010
  106. #define SRC_ILBUFFER_12        1011
  107. #define SRC_ILBUFFER_13        1012
  108. #define SRC_ILBUFFER_14        1013
  109. #define SRC_ILBUFFER_15        1014
  110. #define SRC_ILBUFFER_16        1015
  111.  
  112. /* minmax */
  113. #define MINMAX_ENABLE           0
  114. #define MINMAX_DISABLE          1
  115. #define MINMAX_INIT             2
  116.  
  117. /* histogram */
  118. #define HIST_ENABLE        0
  119. #define HIST_DISABLE        1
  120. #define HIST_CLEAR        2
  121.  
  122. /* defines for readcomponent */
  123. #define RC_ABGR            4
  124. #define RC_ALPHA        0
  125. #define RC_BLUE            1
  126. #define RC_GREEN        2
  127. #define RC_RED            3
  128.  
  129. /* defines for blendfunction */
  130. #define BF_ZERO            0
  131. #define BF_ONE            1
  132. #define BF_DC            2
  133. #define BF_SC            2
  134. #define BF_MDC            3
  135. #define BF_MSC            3
  136. #define BF_SA            4
  137. #define BF_MSA            5
  138. #define BF_DA            6
  139. #define BF_MDA            7
  140. #define BF_MIN_SA_MDA        8
  141. #define BF_CA            9
  142. #define BF_MCA            10
  143. #define BF_CC            11
  144. #define BF_MCC            12
  145. #define BF_MIN            13
  146. #define BF_MAX            14
  147.  
  148. /* defines for afunction */
  149. #define AF_NEVER            0
  150. #define AF_LESS             1
  151. #define AF_EQUAL            2
  152. #define AF_LEQUAL           3
  153. #define AF_GREATER          4
  154. #define AF_NOTEQUAL         5
  155. #define AF_GEQUAL           6
  156. #define AF_ALWAYS           7
  157.  
  158. /* defines for zfunction */
  159. #define ZF_NEVER        0
  160. #define ZF_LESS            1
  161. #define ZF_EQUAL        2
  162. #define ZF_LEQUAL        3
  163. #define ZF_GREATER        4
  164. #define ZF_NOTEQUAL        5
  165. #define ZF_GEQUAL        6
  166. #define ZF_ALWAYS        7
  167.  
  168. /* defines for zsource */
  169. #define ZSRC_DEPTH        0
  170. #define ZSRC_COLOR        1
  171.  
  172. /* defines for pntsmooth */
  173. #define SMP_OFF            0x0
  174. #define SMP_ON            0x1
  175. #define SMP_SMOOTHER        0x2
  176.  
  177. /* defines for linesmooth */
  178. #define SML_OFF            0x0
  179. #define SML_ON            0x1
  180. #define SML_SMOOTHER        0x2
  181. #define SML_END_CORRECT        0x4
  182.  
  183. /* defines for polysmooth, NOTE, these must be decimal to allow
  184.  * macros in STAPUFT pe ucode (modes.m) to build
  185.  */
  186. #define PYSM_OFF                0
  187. #define PYSM_ON                 1
  188. #define PYSM_SHRINK             2
  189.  
  190. /* defines for msalpha */
  191. #define MSA_MASK        0x0
  192. #define MSA_MASK_ONE        0x1
  193. #define MSA_ALPHA        0x2
  194.  
  195. /* defines for mssample */
  196. #define MSS_POINT        0x0
  197. #define MSS_AREA        0x1
  198. #define MSS_CENTER_POINT    0x2
  199.  
  200. /* defines for mspattern */
  201. #define MSP_DEFAULT        0x0
  202. #define MSP_2PASS_0        0x1
  203. #define MSP_2PASS_1        0x2
  204. #define MSP_4PASS_0        0x3
  205. #define MSP_4PASS_1        0x4
  206. #define MSP_4PASS_2        0x5
  207. #define MSP_4PASS_3        0x6
  208.  
  209. /* dither modes    */
  210. #define DT_OFF            0
  211. #define DT_ON            1
  212.  
  213. /* defines for setpup */
  214. #define PUP_NONE        0
  215. #define PUP_GREY        0x1
  216. #define PUP_BOX            0x2
  217. #define PUP_CHECK        0x4
  218.  
  219. /* defines for glcompat */
  220. #define GLC_OLDPOLYGON        0
  221. #define GLC_ZRANGEMAP        1
  222. #define GLC_MQUEUERATE        2
  223. #define GLC_SOFTATTACH        3
  224. #define GLC_MANAGEBG        4
  225. #define GLC_SLOWMAPCOLORS    5
  226. #define GLC_INPUTCHANGEBUG    6
  227. #define GLC_NOBORDERBUG        7
  228. #define GLC_SET_VSYNC        8
  229. #define GLC_GET_VSYNC        9
  230. #define GLC_VSYNC_SLEEP        10
  231. #define GLC_FORCECIMAP        11
  232. #define GLC_TABLETSCALE        12
  233. #define GLC_NODESTALPHA        13
  234. #define GLC_NORELEASECONTEXT    14
  235. #define GLC_FLUSHMODE        15
  236. #define GLC_ILCMD        1008
  237. #define GLC_IL_READCOMPONENT    0
  238. #define GLC_IL_RECTZOOMOFF    1
  239. #define GLC_IL_CONVOLVE        2
  240. #define GLC_IL_LRECTPROC    3
  241. #define GLC_IL_HISTOGRAM    4
  242. #define GLC_IL_GETHISTOGRAM    5
  243. #define GLC_IL_MINMAX        6
  244. #define GLC_IL_GETMINMAX    7
  245. #define GLC_IL_PIXELMAP        8
  246. #define GLC_IL_PIXELTRANSFER    9
  247. #define GLC_IL_ILBUFFER        0xa
  248. #define GLC_IL_ILDRAW        0xb
  249. #define GLC_IL_SUBTEXLOAD    0xc
  250. #define GLC_IL_LEFTBUFFER    0xd
  251. #define GLC_IL_RIGHTBUFFER    0xe
  252. #define GLC_IL_STEREOBUFFER    0xf
  253. #define GLC_IL_MONOBUFFER    0x10
  254. #define GLC_IL_FBSUBTEXLOAD    0x11
  255. #define GLC_IL_ISTEXLOADED    0x12
  256. #define GLC_IL_BLENDCOLOR    0x13
  257.  
  258. /* value for GLC_MQUEUERATE which is compatible with 3.3 */
  259. #define GLC_COMPATRATE        15
  260. /* value for GLC_MQUEUERATE which causes maximum compression */
  261. #define GLC_CMPRESS        1
  262.  
  263. /* defines for curstype */
  264. #define C16X1            0
  265. #define C16X2            1
  266. #define C32X1            2
  267. #define C32X2            3
  268. #define CCROSS            4
  269.  
  270. /* defines for shademodel */
  271. #define FLAT            0    /* For compatibility */
  272. #define GOURAUD            1    /* For compatibility */
  273.  
  274. /* defines for logicop */
  275. #define LO_ZERO            0x0
  276. #define LO_AND            0x1
  277. #define LO_ANDR            0x2
  278. #define LO_SRC            0x3
  279. #define LO_ANDI            0x4
  280. #define LO_DST            0x5
  281. #define LO_XOR            0x6
  282. #define LO_OR            0x7
  283. #define LO_NOR            0x8
  284. #define LO_XNOR            0x9
  285. #define LO_NDST            0xa
  286. #define LO_ORR            0xb
  287. #define LO_NSRC            0xc
  288. #define LO_ORI            0xd
  289. #define LO_NAND            0xe
  290. #define LO_ONE            0xf
  291.  
  292. /* define for scrnselect */
  293. #define INFOCUSSCRN        -2
  294.  
  295. /* defines for stencil */
  296. #define ST_KEEP            0
  297. #define ST_ZERO            1
  298. #define ST_REPLACE        2
  299. #define ST_INCR            3
  300. #define ST_DECR            4
  301. #define ST_INVERT        5
  302. #define SF_NEVER        0
  303. #define SF_LESS            1
  304. #define SF_EQUAL        2
  305. #define SF_LEQUAL        3
  306. #define SF_GREATER        4
  307. #define SF_NOTEQUAL        5
  308. #define SF_GEQUAL        6
  309. #define SF_ALWAYS        7
  310.  
  311. /* defines for scrsubdivide */
  312. #define SS_OFF            0
  313. #define SS_DEPTH        1
  314.  
  315. /* defines for polymode */
  316. #define PYM_FILL        1
  317. #define PYM_POINT        2
  318. #define PYM_LINE        3
  319. #define PYM_HOLLOW        4
  320. #define PYM_LINE_FAST        5
  321.  
  322. /* defines for fogvertex */
  323. #define FG_OFF            0
  324. #define FG_ON            1
  325. #define FG_DEFINE        2
  326. #define FG_VTX_EXP        2 /* aka FG_DEFINE*/
  327. #define FG_VTX_LIN        3
  328. #define FG_PIX_EXP        4
  329. #define FG_PIX_LIN        5
  330. #define FG_VTX_EXP2        6 
  331. #define FG_PIX_EXP2        7
  332.  
  333. /* defines for pixmode */
  334. #define PM_SHIFT        0
  335. #define PM_EXPAND        1
  336. #define PM_C0            2
  337. #define PM_C1            3
  338. #define PM_ADD24        4
  339. #define PM_SIZE            5
  340. #define PM_OFFSET        6
  341. #define PM_STRIDE        7
  342. #define PM_TTOB            8
  343. #define PM_RTOL            9
  344. #define PM_ZDATA        10
  345. #define PM_WARP            11
  346. #define PM_RDX            12
  347. #define PM_RDY            13
  348. #define PM_CDX            14
  349. #define PM_CDY            15
  350. #define PM_XSTART        16
  351. #define PM_YSTART        17
  352. #define PM_VO1            1000    /* internal use only */
  353.  
  354. /* defines for VENICE float path pixels/texels */
  355. #define PM_INPUT_FORMAT        11
  356. #define PM_INPUT_TYPE        12
  357. #define PM_OUTPUT_FORMAT    13
  358. #define PM_OUTPUT_TYPE        14
  359. #define PM_ABGR            0
  360. #define PM_BGR            1
  361. #define PM_RGBA            2
  362. #define PM_RGB            3
  363. #define PM_LUMINANCE        4
  364. #define PM_LUMINANCEA        5
  365. #define PM_ALPHA        6
  366. #define PM_COLOR_INDEX        7
  367. #define PM_STENCIL_INDEX    8
  368. #define PM_DEPTH        9
  369. #define PM_RED            10
  370. #define PM_GREEN        11
  371. #define PM_BLUE            12
  372.  
  373.  
  374. #define PM_BITMAP        0
  375. #define PM_BYTE            1
  376. #define PM_UNSIGNED_BYTE    2
  377. #define PM_SHORT_12        3
  378. #define PM_UNSIGNED_SHORT_12    4
  379. #define PM_SHORT        5
  380. #define PM_UNSIGNED_SHORT    6
  381. #define PM_INT            7
  382. #define PM_UNSIGNED_INT        8
  383. #define PM_FLOAT        9
  384.  
  385. /* defines for convolve */
  386. #define CV_OFF            0
  387. #define CV_GENERAL        1
  388. #define CV_SEPARABLE        2
  389. #define CV_REDUCE        1
  390.  
  391. /* defines for pixelmap */
  392. #define MAP_I_TO_I        0
  393. #define MAP_I_TO_R        1
  394. #define MAP_I_TO_G        2
  395. #define MAP_I_TO_B        3
  396. #define MAP_I_TO_A        4
  397. #define MAP_R_TO_R        5
  398. #define MAP_G_TO_G        6
  399. #define MAP_B_TO_B        7
  400. #define MAP_A_TO_A        8
  401.  
  402. /* defines for pixeltransfer */
  403. #define PT_MAP_COLOR        0
  404. #define PT_MAP_DISABLE        0
  405. #define PT_MAP_CLAMP        1
  406. #define PT_MAP_ENABLE        2
  407.  
  408. #define PT_RED_SCALE        1
  409. #define PT_RED_BIAS        2
  410. #define PT_GREEN_SCALE        3
  411. #define PT_GREEN_BIAS        4
  412. #define PT_BLUE_SCALE        5
  413. #define PT_BLUE_BIAS        6
  414. #define PT_ALPHA_SCALE        7
  415. #define PT_ALPHA_BIAS        8
  416.  
  417. /* defines for nmode */
  418. #define NAUTO            0
  419. #define NNORMALIZE        1
  420.  
  421. /* defines for acbuf */
  422. #define AC_CLEAR                0
  423. #define AC_ACCUMULATE           1
  424. #define AC_CLEAR_ACCUMULATE     2
  425. #define AC_RETURN               3
  426. #define AC_MULT                 4
  427. #define AC_ADD                  5
  428.  
  429. /* defines for clipplane */
  430. #define CP_OFF                  0
  431. #define CP_ON                   1
  432. #define CP_DEFINE               2
  433.  
  434. /* defines for scrbox */
  435. #define SB_RESET                0
  436. #define SB_TRACK                1
  437. #define SB_HOLD                 2
  438.  
  439.  
  440. /* defines for readdisplay */
  441. #define RD_FREEZE        0x00000001
  442. #define RD_ALPHAONE        0x00000002
  443. #define RD_IGNORE_UNDERLAY    0x00000004
  444. #define RD_IGNORE_OVERLAY    0x00000008
  445. #define RD_IGNORE_PUP        0x00000010
  446. #define RD_OFFSCREEN        0x00000020
  447.  
  448. /* defines for getgconfig */
  449. #define GC_BITS_CMODE        0
  450. #define GC_BITS_RED        1
  451. #define GC_BITS_GREEN        2
  452. #define GC_BITS_BLUE        3
  453. #define GC_BITS_ALPHA        4
  454. #define GC_BITS_ZBUFFER        5
  455. #define GC_ZMIN            6
  456. #define GC_ZMAX            7
  457. #define GC_BITS_STENCIL        8
  458. #define GC_BITS_ACBUF        9
  459. #define GC_MS_SAMPLES        10
  460. #define GC_BITS_MS_ZBUFFER    11
  461. #define GC_MS_ZMIN        12
  462. #define GC_MS_ZMAX        13
  463. #define GC_BITS_MS_STENCIL    14
  464. #define GC_STEREO        15
  465. #define GC_DOUBLE        16
  466.  
  467.  
  468. /* 
  469.  * START defines for getgdesc 
  470.  */
  471.  
  472. #define GD_XPMAX        0
  473. #define GD_YPMAX        1
  474. #define GD_XMMAX        2
  475. #define GD_YMMAX        3
  476. #define GD_ZMIN            4
  477. #define GD_ZMAX            5
  478. #define GD_BITS_NORM_SNG_RED    6
  479. #define GD_BITS_NORM_SNG_GREEN    7
  480. #define GD_BITS_NORM_SNG_BLUE    8
  481. #define GD_BITS_NORM_DBL_RED    9
  482. #define GD_BITS_NORM_DBL_GREEN    10
  483. #define GD_BITS_NORM_DBL_BLUE    11
  484. #define GD_BITS_NORM_SNG_CMODE    12
  485. #define GD_BITS_NORM_DBL_CMODE    13
  486. #define GD_BITS_NORM_SNG_MMAP    14
  487. #define GD_BITS_NORM_DBL_MMAP    15
  488. #define GD_BITS_NORM_ZBUFFER    16
  489. #define GD_BITS_OVER_SNG_CMODE    17
  490. #define GD_BITS_UNDR_SNG_CMODE    18
  491. #define GD_BITS_PUP_SNG_CMODE    19
  492. #if 0
  493. NOTE: 0->19 used in DaVinci PI release --- DO NOT CHANGE THEM
  494. New defines for Aspen/Birch start here.....
  495. #endif
  496. #define GD_BITS_NORM_SNG_ALPHA    21 
  497. #define GD_BITS_NORM_DBL_ALPHA    22
  498. #define GD_BITS_CURSOR        23
  499. #define GD_OVERUNDER_SHARED    24
  500. #define GD_BLEND        25
  501. #define GD_CIFRACT        26
  502. #define GD_CROSSHAIR_CINDEX    27
  503. #define GD_DITHER        28
  504. #define GD_LINESMOOTH_CMODE    30
  505. #define GD_LINESMOOTH_RGB    31
  506. #define GD_LOGICOP        33
  507. #define GD_NSCRNS        35
  508. #define GD_NURBS_ORDER        36
  509. #define GD_NBLINKS        37
  510. #define GD_NVERTEX_POLY        39
  511. #define GD_PATSIZE_64        40
  512. #define GD_PNTSMOOTH_CMODE    41
  513. #define GD_PNTSMOOTH_RGB    42
  514. #define GD_PUP_TO_OVERUNDER    43
  515. #define GD_READSOURCE        44
  516. #define GD_READSOURCE_ZBUFFER    48
  517. #define GD_STEREO        50
  518. #define GD_SUBPIXEL_LINE    51
  519. #define GD_SUBPIXEL_PNT        52
  520. #define GD_SUBPIXEL_POLY    53
  521. #define GD_TRIMCURVE_ORDER    54
  522. #define GD_WSYS            55
  523. #define GD_ZDRAW_GEOM        57
  524. #define GD_ZDRAW_PIXELS        58
  525. #define GD_SCRNTYPE        61
  526. #define GD_TEXTPORT        62
  527. #define GD_NMMAPS        63
  528. #define GD_FRAMEGRABBER        64
  529. #define GD_TIMERHZ        66
  530. #define GD_DBBOX        67
  531. #define GD_AFUNCTION        68
  532. #define GD_ALPHA_OVERUNDER    69
  533. #define GD_BITS_ACBUF        70
  534. #define GD_BITS_ACBUF_HW    71
  535. #define GD_BITS_STENCIL        72
  536. #define GD_CLIPPLANES        73
  537. #define GD_FOGVERTEX        74
  538. #define GD_LIGHTING_TWOSIDE    76
  539. #define GD_POLYMODE        77
  540. #define GD_POLYSMOOTH        78
  541. #define GD_SCRBOX        79
  542. #define GD_TEXTURE        80
  543. #define GD_FOGPIXEL        81
  544. #define GD_TEXTURE_PERSP    82
  545. #define GD_MUXPIPES        83
  546. #define GD_MULTISAMPLE        84
  547. #define GD_TEXTURE_3D        85
  548. #define GD_TEXTURE_LUT        86
  549. #define GD_TEXTURE_SHARP    87
  550. #define GD_TEXTURE_DETAIL    88
  551. #define GD_STEREO_IN_WINDOW    89
  552. #define GD_BLENDCOLOR        90
  553. #define GD_LIGHTING_SPOTLIGHT    91
  554. #define GD_LIGHTING_ATT2    92
  555. #define GD_AFUNCTION_MODES    93
  556. #define GD_TEXTURE_MEMORY_SIZE    94
  557. #define GD_IS_IGLOO        95
  558. #define GD_IS_NATIVE        96
  559.  
  560. #if 0
  561. - unused 20,29,32,34,38,45-47,49,56,59,60,65,75
  562. - last entry = 95  UPDATE THIS WHEN ADDING NEW GD_* SYMBOLS !!!
  563. - cmd/gtst/util/Makefile assumes that there are no more inquiries upon
  564.   finding GD_NOLIMIT.
  565. #endif
  566.  
  567. /* return value for inquiries when there is no limit */
  568. #define GD_NOLIMIT        -2
  569.  
  570. /* return values for GD_WSYS */
  571. #define GD_WSYS_NONE        0
  572. #define GD_WSYS_4S        1
  573. #if 0
  574. #define GD_WSYS_X        2
  575. /* make public once we announce that X will be our window management system 
  576.  * of the future */
  577. #define GD_WSYS_PM        3
  578. /* make public once we announce that we will support PM */
  579. #endif
  580.  
  581. /* return values for GD_SCRNTYPE */
  582. #define GD_SCRNTYPE_WM        0
  583. #define GD_SCRNTYPE_NOWM    1
  584. #if 0
  585. #define GD_SCRNTYPE_ALPHAPLANES    2    
  586. /* just a placeholder; if we ever build this, this define will need to be 
  587.  * made public */
  588. #endif
  589.  
  590. /* 
  591.  * END defines for getgdesc 
  592.  */
  593.  
  594.  
  595. /* 
  596.  * START NURBS interface definitions 
  597.  */
  598.  
  599. /* NURBS Rendering Properties */
  600. #define N_PIXEL_TOLERANCE     1
  601. #define N_CULLING        2
  602. #define N_DISPLAY        3
  603. #define N_ERRORCHECKING        4
  604. #define N_SUBDIVISIONS        5
  605. #define N_S_STEPS        6
  606. #define N_T_STEPS        7
  607. #define N_TILES            8
  608. #define N_TMP1            9
  609. #define N_TMP2            10
  610. #define N_TMP3            11
  611. #define N_TMP4            12
  612. #define N_TMP5            13
  613. #define N_TMP6            14
  614.  
  615. #define N_FILL            1.0
  616. #define N_OUTLINE_POLY        2.0
  617. #define N_OUTLINE_PATCH        5.0
  618. #define N_ISOLINE_S        12.0
  619.  
  620. /*---------------------------------------------------------------------------
  621.  * FLAGS FOR NURBS SURFACES AND CURVES            
  622.  * WARNING: Any changes to these flags should be checked against the 
  623.  * decoding macros in nurbs.h.
  624.  *
  625.  * Bit: 876 5432 10 
  626.  *     |ttt|nnnn|rr|   :  rr - 2 bits = 1 if rational coordinate exists
  627.  *               : nnn - 4 bits for number of coordinates
  628.  *               : ttt - 3 bits for type of data (color, position, etc.)
  629.  *    
  630.  *
  631.  * NURBS data type
  632.  * N_T_ST         0     parametric space data
  633.  * N_T_XYZ        1     model space data
  634.  * N_T_TEX        2     texture coordinate data
  635.  * N_T_RGBA        3     color data
  636.  *
  637.  * Number of coordinates per datum
  638.  * N_COORD2         2     2 coords
  639.  * N_COORD3        3     3 coords
  640.  * N_COORD4        4     4 coords
  641.  * N_COORD5        5     5 coords
  642.  *
  643.  * rational or non-rational data and position in memory 
  644.  * N_NONRATIONAL    0     non-rational data
  645.  * N_RATIONAL        1     rational data with rat coord after rest
  646.  *
  647.  * N_MKFLAG(t,n,r) ((t<<6) | (n<<2) | r)
  648.  *    
  649.  *---------------------------------------------------------------------------
  650.  */
  651. #define N_ST      0x8    /* N_MKFLAG( N_T_ST,  N_COORD2, N_NONRATIONAL ) */
  652. #define N_STW      0xd    /* N_MKFLAG( N_T_ST,  N_COORD3, N_RATIONAL )     */
  653. #define N_XYZ     0x4c    /* N_MKFLAG( N_T_XYZ, N_COORD3, N_NONRATIONAL ) */
  654. #define N_XYZW     0x51    /* N_MKFLAG( N_T_XYZ, N_COORD4, N_RATIONAL )     */
  655. #define N_TEX     0x88    /* N_MKFLAG( N_T_TEX, N_COORD2, N_NONRATIONAL ) */
  656. #define N_TEXW     0x8d    /* N_MKFLAG( N_T_TEX, N_COORD3, N_RATIONAL ) */
  657. #define N_RGBA     0xd0    /* N_MKFLAG( N_T_RGBA, N_COORD4, N_NONRATIONAL ) */
  658. #define N_RGBAW     0xd5    /* N_MKFLAG( N_T_RGBA, N_COORD5, N_RATIONAL ) */
  659.  
  660. /* New versions of above constants */
  661.  
  662. #define N_P2D     0x8    /* N_MKFLAG( N_T_ST,  N_COORD2, N_NONRATIONAL ) */
  663. #define N_P2DR     0xd    /* N_MKFLAG( N_T_ST,  N_COORD3, N_RATIONAL )     */
  664. #define N_V3D     0x4c    /* N_MKFLAG( N_T_XYZ, N_COORD3, N_NONRATIONAL ) */
  665. #define N_V3DR     0x51    /* N_MKFLAG( N_T_XYZ, N_COORD4, N_RATIONAL )     */
  666. #define N_T2D     0x88    /* N_MKFLAG( N_T_TEX, N_COORD2, N_NONRATIONAL ) */
  667. #define N_T2DR     0x8d    /* N_MKFLAG( N_T_TEX, N_COORD3, N_RATIONAL ) */
  668. #define N_C4D     0xd0    /* N_MKFLAG( N_T_RGBA, N_COORD4, N_NONRATIONAL ) */
  669. #define N_C4DR     0xd5    /* N_MKFLAG( N_T_RGBA, N_COORD5, N_RATIONAL ) */
  670.  
  671. /* 
  672.  * END NURBS interface definitions 
  673.  */
  674.  
  675.  
  676. /* 
  677.  * START lighting model defines 
  678.  */
  679.  
  680. #define LMNULL            0.0
  681.  
  682. /* MATRIX modes    */
  683. #define MSINGLE            0
  684. #define MPROJECTION        1
  685. #define MVIEWING        2
  686. #define MTEXTURE        3
  687.  
  688. /* LIGHT constants */
  689. #define MAXLIGHTS        8
  690. #define MAXRESTRICTIONS        4
  691.  
  692. #if 0
  693. NB. DGL code assumes that all three types of properties have the same name 
  694. space.
  695. #endif
  696. /* MATERIAL properties */
  697. #define DEFMATERIAL        0
  698. #define EMISSION        1
  699. #define AMBIENT            2
  700. #define DIFFUSE            3
  701. #define SPECULAR        4
  702. #define SHININESS        5
  703. #define COLORINDEXES        6
  704. #define ALPHA            7
  705.  
  706. /* LIGHT properties */
  707. #define DEFLIGHT        100
  708. #define LCOLOR            101
  709. #define POSITION        102
  710. #define SPOTDIRECTION        103
  711. #define SPOTLIGHT        104
  712.  
  713.  
  714. /* LIGHTINGMODEL properties */
  715. #define DEFLMODEL        200
  716. #define LOCALVIEWER        201
  717. #define ATTENUATION        202
  718. #define ATTENUATION2        203
  719. #define TWOSIDE            204
  720.  
  721.  
  722. /* TARGET constants */
  723. #define MATERIAL        1000
  724. #define BACKMATERIAL        1001
  725. #define LIGHT0            1100
  726. #define LIGHT1            1101
  727. #define LIGHT2            1102
  728. #define LIGHT3            1103
  729. #define LIGHT4            1104
  730. #define LIGHT5            1105
  731. #define LIGHT6            1106
  732. #define LIGHT7            1107
  733. #define LMODEL            1200
  734.  
  735. /* lmcolor modes */
  736. #define LMC_COLOR        0
  737. #define LMC_EMISSION        1
  738. #define LMC_AMBIENT        2
  739. #define LMC_DIFFUSE        3
  740. #define LMC_SPECULAR        4
  741. #define LMC_AD            5
  742. #define LMC_NULL        6
  743.  
  744. /*
  745.  * END lighting model defines 
  746.  */
  747.  
  748.  
  749. /* 
  750.  * START texturing defines 
  751.  */
  752.  
  753. /* texdef param token values */
  754. #define TX_MINFILTER        0x100
  755. #define TX_MAGFILTER        0x200
  756. #define TX_MAGFILTER_COLOR      0xa00
  757. #define TX_MAGFILTER_ALPHA      0xb00
  758. #define TX_WRAP            0x300
  759. #define TX_WRAP_S        0x310
  760. #define TX_WRAP_T        0x320
  761. #define TX_WRAP_R        0x330
  762. #define TX_TILE            0x400
  763. #define    TX_BORDER        0x500
  764. #define TX_DETAIL               0xe00
  765. #define TX_FAST_DEFINE        0x0f00
  766. #define TX_NOCOPY                               TX_FAST_DEFINE /* obsolete */
  767. #define TX_FRAMEBUFFER_SRC                      0x1000 /* obsolete */
  768. #define TX_SUBTEXLOAD                           0x2000 /* obsolete */
  769. #define TX_FORMATTED_16bit_64x64    0x2000
  770. #define TX_FORMATTED_ABGR_8_128x128    0x2010
  771. #define TX_CONTROL_POINT        0xc00
  772. #define TX_CONTROL_CLAMP        0xd00
  773. #define TX_NULL            0x000
  774.  
  775. /* texture external formats */
  776. #define TX_EXTERNAL_FORMAT      0x700
  777. #define TX_PACK_8               0x710   /* just like STAPUFT 4.0 */
  778. #define TX_PACK_16              0x720   /* */
  779. #define TX_NOPACK_12        0x730   /* 12 bits in 12 lsb bits of short */
  780. #define TX_PIXMODE        0x3000
  781. #define    TX_BICUBIC_FILTER    0x4000    /* user bicubic kernel parameters */
  782.  
  783. #define TX_INTERNAL_FORMAT      0x600
  784. /* choices for TX_INTERNAL_FORMAT */
  785. #define TX_I_12                 0x610   /* 1-comp                      full    speed */
  786. #define TX_I_12A_4              0x610   /*        2-comp               full    speed */
  787. #define TX_I_8                  0x620   /* 1-comp                      full    speed */
  788. #define TX_IA_8                 0x620   /*        2-comp               full    speed */
  789. #define TX_RGB_5                0x630   /*               3-comp        full    speed */
  790. #define TX_RGBA_4               0x640   /*                      4-comp full    speed */
  791. #define TX_IA_12                0x650   /*        2-comp               half    speed */
  792. #define TX_RGBA_8               0x660   /*                      4-comp half    speed */
  793. #define TX_RGB_8                0x660   /*               3-comp        half    speed */
  794. #define TX_RGB_12               0x680   /*               3-comp        third   speed */
  795. #define TX_RGBA_12              0x670   /*                      4-comp quarter speed */
  796. #define TX_I_16                 0x690    /* should only be used in SHADOW mode */
  797.  
  798.  
  799. #define TX_MIPMAP_FILTER_KERNEL 0x900   /* seperable 8x8x8 filter kernel */
  800.  
  801. /* texture filter choices */
  802. #define TX_POINT        0x110
  803. #define TX_BILINEAR        0x220
  804. #define TX_MIPMAP        0x120
  805. #define TX_MIPMAP_POINT        0x121
  806. #define TX_MIPMAP_LINEAR    0x122
  807. #define TX_MIPMAP_BILINEAR    0x123
  808. #define TX_MIPMAP_TRILINEAR    0x124
  809. #define TX_BICUBIC                      0x230
  810. #define TX_SHARPEN                      0x240
  811. #define TX_MODULATE_DETAIL              0x250
  812. #define TX_ADD_DETAIL                   0x260
  813. #define TX_TRILINEAR                    0x270
  814. #define TX_MIPMAP_QUADLINEAR            0x280
  815. #define TX_BICUBIC_GEQUAL               0x290
  816. #define TX_BICUBIC_LEQUAL               0x2a0
  817. #define TX_BILINEAR_GEQUAL              0x2b0
  818. #define TX_BILINEAR_LEQUAL              0x2c0
  819.  
  820.  
  821. /* texture wrapping access choices */
  822. #define TX_REPEAT        0x301
  823. #define TX_CLAMP        0x302
  824. #define TX_SELECT        0x303
  825.  
  826. /* texture targets */
  827. #define TX_TEXTURE_0        0
  828. #define TX_TEXTURE_DETAIL       1 /* This binds a texture to the DETAIL texture resource */
  829. #define TX_TEXTURE_IDLE        2
  830.  
  831. /* texture environment definitions */
  832. #define TV_MODULATE        0x101
  833. #define TV_BLEND        0x102
  834. #define TV_DECAL        0x103
  835. #define TV_COLOR        0x200
  836. #define TV_SHADOW               0x104
  837. #define TV_ALPHA                0x105
  838. #define TV_COMPONENT_SELECT     0x300
  839. #define TV_I_GETS_R             0x310
  840. #define TV_I_GETS_G             0x320
  841. #define TV_I_GETS_B             0x330
  842. #define TV_I_GETS_A             0x340
  843. #define TV_IA_GETS_RG           0x350
  844. #define TV_IA_GETS_BA           0x360
  845. #define TV_I_GETS_I             0x370
  846. #define TV_NULL            0x000
  847.  
  848. /* texture lookup table definitions */
  849. #define TL_NULL                 0x0
  850. #define TL_TLUT_0        0
  851.  
  852. /* texture environment targets */
  853. #define TV_ENV0         0
  854.  
  855. /* defines for texgen */
  856. #define TX_S            0
  857. #define TX_T            1
  858. #define TX_R            2
  859. #define TX_Q            3
  860. #define TG_OFF            0
  861. #define TG_ON            1
  862. #define TG_CONTOUR        2
  863. #define TG_LINEAR        3
  864. #define TG_SPHEREMAP        4
  865. #define TG_REFRACTMAP        5    /* not yet approved! */
  866.  
  867. /*
  868.  * END texturing defines 
  869.  */
  870.  
  871. /* 
  872.  * START multi-byte character types for lcharstr and lstrwidth
  873.  */
  874.  
  875. #define STR_B    0x000
  876. #define STR_2B    0x001
  877. #define STR_3B    0x010
  878. #define STR_4B    0x011
  879. #define STR_16    0x100
  880. #define STR_32    0x101
  881.  
  882. /* 
  883.  * END mbcharstr defines
  884.  */
  885.  
  886. /* 
  887.  * START Distributed Graphics Library defines 
  888.  */
  889.  
  890. #define DGLSINK            0    /* sink connection    */
  891. #define DGLLOCAL        1    /* local connection    */
  892. #define DGLTSOCKET        2    /* tcp socket connection*/
  893. #define DGL4DDN            3    /* 4DDN (DECnet)    */
  894.  
  895. /* 
  896.  * END Distributed Graphics Library defines 
  897.  */
  898.  
  899.  
  900. /* 
  901.  * START obsolete defines - included for backwards compatibility 
  902.  */
  903.  
  904. #define GLDEF            __GL_GL_H__
  905.  
  906. #define PUP_CURSOR        PUP_COLOR
  907.  
  908. #define FATAL           1       /* exit from program after printing message */
  909. #define WARNING         2       /* print message and continue */
  910. #define ASK_CONT        3       /* ask if program should continue */
  911. #define ASK_RESTART     4       /* ask if program should be restarted */
  912.  
  913. /* high-resolution monitor */
  914. #define XMAXSCREEN        1279
  915. #define YMAXSCREEN        1023
  916.  
  917. /* medium-resolution monitor */
  918. #define XMAXMEDIUM        1023    
  919. #define YMAXMEDIUM        767
  920.  
  921. /* RS-170 */
  922. #define XMAX170            645    
  923. #define YMAX170            484
  924.  
  925. /* PAL */
  926. #define XMAXPAL            779    
  927. #define YMAXPAL            574
  928.  
  929. /* 
  930.  * END obsolete defines
  931.  */
  932.  
  933. #endif /* !__GL_GLCONSTS_H__ */
  934.